home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / clippings / 911205-01 < prev    next >
Encoding:
Internet Message Format  |  1992-01-09  |  2.8 KB

  1. From: sgf@cfm.brown.edu (Sam Fulcomer)
  2. Newsgroups: alt.security,comp.unix.admin
  3. Subject: Re: NIS and password security
  4. Message-ID: <95123@brunix.UUCP>
  5. Date: 5 Dec 91 13:46:11 GMT
  6. References: <1991Dec4.170052.14839@mp.cs.niu.edu> <KIMMO.SUOMINEN.91Dec4194510@lauri.it.lut.fi> <prl.691873839@iis>
  7. Organization: Brown University Center for Fluid Mechanics
  8.  
  9. In article <prl.691873839@iis> prl@iis.ethz.ch (Peter Lamb) writes:
  10. >There have been a number of queries and some not completely accurate
  11. >information posted on this question. I'll try to summarise the problem and
  12. >
  13. >The problem is this: ypserv is totally indiscriminate about which machines
  14. >it will respond to queries from. Normal NIS maps can be read by anyone 
  15. >
  16. >1) The Sun Party Line. "Don't run ypserv on your gateway and disable
  17. >   IP forwarding on the gateway". This is commonly known as a
  18.  
  19. Well, the most functional arrangement is to have the ypserv'r set up
  20. with static routes limited to the set of ypbind'rs authorized (no
  21. default route...).
  22.  
  23. The following may be a little disjointed, since it's just paste-up
  24. out of a few of my mbox.out's from the past couple of years.
  25.  
  26. --------------------
  27.  
  28. The problem is much grosser. ypbind usually uses a non-priv
  29. port. Most implementations of the portmapper allow any uid to unregister
  30. services on non-priv ports. This means that anyone can register a new
  31. ypbind, perhaps pointing to a ypserv with a passwd map entry something
  32. like "fooroot" (uid 0). 
  33.  
  34. The way to avoid this on Suns is to run ypbind with the "-s" option. This
  35. has the undocumented behaviour of running on a privileged 
  36. port, causing portmap to disallow deregistration by non-root. The way to
  37. avoid it on non-suns that aren't fixed is to _REMOVE_ the "+" entry
  38. >From the passwd file or run a patched portmap and ypbind (patch the portmap to
  39. respect privileged ports and patch ypbind to register on one...).
  40. This is a _really_ ugly problem. If the "+" entry is left in the passwd
  41. file, even if you're not actually running ypbind, all a user has to do is fire
  42. it up.
  43.  
  44. The portmapper is, of course, susceptible to mischief in the form
  45. of wholesale deregistration of important services.
  46.  
  47. The smart-money portmapper would only deregister services which
  48. were registered by a process with matching credentials. At least
  49. it would make things a dependable as the current crud-type.
  50.  
  51. If you want reasonably secure yp...
  52.  
  53.         - implement ypexports for ypserv (like /etc/exports). have it
  54.           use /etc/netgroup
  55.  
  56.         - have ypbind always run as root on a reserved port
  57.  
  58.         - have portmap respect services on reserved ports
  59.  
  60.         - make sure that portmap only accepts map/unmap calls from
  61.           the local machine
  62.  
  63.  
  64.  
  65. -- 
  66. _/**/Sam_Fulcomer    sgf@cfm.brown.edu    What, me panic: uba crazy
  67.  
  68. Associate Director for Computing Facilities and Scientific Visualization
  69. Brown University  Center for Fluid Mechanics, Turbulence and Computation
  70.  
  71.